package LesThreads;

public class ThrPuise extends Thread {
	private int vol, delai;
	private Reserve r;

	public ThrPuise(Reserve r, int vol, int delai) {
		this.r = r;
		this.vol = vol;
		this.delai = delai;
	}

	public void run() {
		try {
			while (!interrupted()) {
				r.puise(vol);
				sleep(delai);
			}
		} catch (InterruptedException e) {
			// TODO: handle exception
		}
	}
}
